package com.lxmes.pm.service.impl;

import java.util.List;
import com.lxmes.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lxmes.pm.mapper.AMeetingMapper;
import com.lxmes.pm.domain.AMeeting;
import com.lxmes.pm.service.IAMeetingService;

/**
 * 学术会议Service业务层处理
 * 
 * @author zhangzhiyu
 * @date 2023-04-04
 */
@Service
public class AMeetingServiceImpl implements IAMeetingService 
{
    @Autowired
    private AMeetingMapper aMeetingMapper;

    /**
     * 查询学术会议
     * 
     * @param id 学术会议主键
     * @return 学术会议
     */
    @Override
    public AMeeting selectAMeetingById(Long id)
    {
        return aMeetingMapper.selectAMeetingById(id);
    }

    /**
     * 查询学术会议列表
     * 
     * @param aMeeting 学术会议
     * @return 学术会议
     */
    @Override
    public List<AMeeting> selectAMeetingList(AMeeting aMeeting)
    {
        return aMeetingMapper.selectAMeetingList(aMeeting);
    }

    /**
     * 新增学术会议
     * 
     * @param aMeeting 学术会议
     * @return 结果
     */
    @Override
    public int insertAMeeting(AMeeting aMeeting)
    {
        aMeeting.setCreateTime(DateUtils.getNowDate());
        return aMeetingMapper.insertAMeeting(aMeeting);
    }

    /**
     * 修改学术会议
     * 
     * @param aMeeting 学术会议
     * @return 结果
     */
    @Override
    public int updateAMeeting(AMeeting aMeeting)
    {
        aMeeting.setUpdateTime(DateUtils.getNowDate());
        return aMeetingMapper.updateAMeeting(aMeeting);
    }

    /**
     * 批量删除学术会议
     * 
     * @param ids 需要删除的学术会议主键
     * @return 结果
     */
    @Override
    public int deleteAMeetingByIds(Long[] ids)
    {
        return aMeetingMapper.deleteAMeetingByIds(ids);
    }

    /**
     * 删除学术会议信息
     * 
     * @param id 学术会议主键
     * @return 结果
     */
    @Override
    public int deleteAMeetingById(Long id)
    {
        return aMeetingMapper.deleteAMeetingById(id);
    }
}
